﻿using LxCFD;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using TimeSolve.Properties;

namespace TimeSolve
{
    /// <summary>
    /// GraphManageWindow.xaml 的交互逻辑
    /// </summary>
    public partial class GraphManageWindow : Window
    {
        public GraphManageWindow()
        {
            InitializeComponent();
            this.Resources["valuearray"] = Enum.GetValues(typeof(ScalarTypes));
            this.DataContext = new GraphManageWindowViewModel();

            //ObservableCollection<Data> data = new ObservableCollection<Data>();
            //for (int i = 1; i <= 9; i += 2)
            //    data.Add(new Data() { Value = i.ToString(), Type = "Odd" });

            //for (int i = 0; i < 10; i += 2)
            //    data.Add(new Data() { Value = i.ToString(), Type = "Even" });

            //this.Resources.Add("data", data);
            //InitializeComponent();
            //ICollectionView vw = CollectionViewSource.GetDefaultView(data);
            //vw.GroupDescriptions.Add(new PropertyGroupDescription("Type"));


            //GraphTree gt = new GraphTree();
            //Scene s = new Scene() { name ="scene1"};
            //s.sceneEles.Add(new SceneEle() { name = "ele1" });
            //s.sceneEles.Add(new SceneEle() { name = "ele2" });
            //s.sceneEles.Add(new SceneEle() { name = "ele3" });
            //Scene s2 = new Scene() { name = "scene2" };
            //s2.sceneEles.Add(new SceneEle() { name = "ele1" });
            //s2.sceneEles.Add(new SceneEle() { name = "ele2" });
            //s2.sceneEles.Add(new SceneEle() { name = "ele3" });
            //gt.scenes.Add(s);
            //gt.scenes.Add(s2);
            //this.vtree.ItemsSource = gt.scenes;
           
            
        }
    }
    //class Data
    //{
    //    public string Value { get; set; }
    //    public string Type { get; set; }
    //}

    //public class GraphTree
    //{
    //    public ObservableCollection<Scene> scenes { get; set; } = new ObservableCollection<Scene>();
    //}
    //public class Scene
    //{
    //    public string name { get; set; }
    //    public ObservableCollection<SceneEle> sceneEles { get; set; } = new ObservableCollection<SceneEle>();
    //    public override string ToString()
    //    {
    //        return name;
    //    }
    //}
    //public class SceneEle
    //{
    //    public string name { get; set; }
    //}
}
